﻿window.require([
    'ui/gis',
    'ui/controller/searchController', 
    'ui/controller/itemController',
    'ui/controller/conditionController',
    'ui/controller/areaLevelController',
	'ui/controller/tradeLevelController',
	'ui/controller/permitActualController',
	'ui/controller/advancedFilterController',
	'ui/controller/yearController',
	'ui/controller/gasWaterTypeController',
	'ui/controller/airController',
	'ui/controller/controlLevelController',
	'ui/card/layerCard'
], function(
	gis, searchController, itemController, 
	conditionController, areaLevelController, tradeLevelController,
	permitActualController, advancedFilterController, yearController,
	gasWaterTypeController, airController, controlLevelController,
	layerCard) {

    console.log(gis);
    
    //map
	gis.init();
	//search
	searchController.initial();
	searchController.eventBind();
	//item
	itemController.initial();
	itemController.eventBind();
	//condition
	conditionController.initial();
	areaLevelController.initial();
	tradeLevelController.initial();
	controlLevelController.initial();
	advancedFilterController.initial();
	gasWaterTypeController.initial();
	yearController.initial();
	airController.initial();
	permitActualController.initial();
	
	//默认显示一个专题
	itemController.selectDefaultItem();
	
	//绑定面板操作
	layerCard.eventBind();
	
	//resizeHeight
	function resizeHeight() {
		var oSize = getPageSize();
		var sWidth = oSize.WindowWidth;
		var sHeight = oSize.WindowHeight;
		$('.n-main').css('height',sHeight);
	}
	resizeHeight(); 
	$(window).resize(function () {
		resizeHeight();
	});
});